<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>标签管理</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
		标签 <span class="c-gray en">&gt;</span> 标签管理 <a
			class="btn btn-success btn-refresh radius r mt-5 mr-20"
			onclick="javascript:location.replace(location.href);"
			href="javascript:location.replace(location.href);" title="刷新">刷新</a>

		<a class="btn btn-primary radius r mt-5 mr-20"
			onclick="u_label_add('添加标签','<%=path%>/backstage/label-add-pre')"
			href="javascript:;"> 添加标签</a>
	</nav>
	<div class="pd-20">
		<!--
		<div class="cl pd-5 bg-1 bk-gray"> 
			<span class="l"> 
			</span>
		 </div>
        -->
		<div class="mt-20">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th width="80">编号</th>
						<th width="100">所属模块</th>
						<th width="200">父标签</th>
						<th>标签名称</th>
						<th width="80">排序</th>
						<th width="150">创建时间</th>
						<th width="150">操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${u_labels}" var="u_label">

						<tr class="text-c">
							<input type="hidden" id="id" name="id" value='${u_label.id}' />
							<td>${u_label.id}</td>
							<td><c:if test="${u_label.type==0}">文章标签</c:if> <c:if
									test="${u_label.type==1}">兴趣标签</c:if> <c:if
									test="${u_label.type==2}">订阅标签</c:if> <c:if
									test="${u_label.type==3}">行业职位标签</c:if> <%-- <c:if test="${u_label.type==4}">圈子标签</c:if> --%>
								<c:if test="${u_label.type==5}">行业类别标签</c:if> <%-- <c:if test="${u_label.type==6}">自媒体属性</c:if> --%>
								<c:if test="${u_label.type==7}">自媒体领域</c:if> <c:if
									test="${u_label.type==8}">专业领域</c:if></td>
							<td>${u_label.parent_name}</td>
							<td>${u_label.label_name}</td>
							<td>${u_label.sort}</td>
							<td>${u_label.create_time}</td>
							<td class="td-manage"><a class="btn btn-warning"
								onClick="u_label_edit(this,'${u_label.id}')"
								href="javascript:void(0);" title="编辑">编辑</a>
								&nbsp;&nbsp;&nbsp;&nbsp; <a class="btn btn-danger"
								onClick="u_label_delete(this,'${u_label.id}')"
								href="javascript:void(0);" title="删除">删除</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript"
		src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript">
		$(function() {
		 	$('.table-sort').dataTable({
		 		     "ordering": false, // 禁止排序
		 		 }); 
			$('.table-sort tbody').on('click', 'tr', function() {
				if ($(this).hasClass('selected')) {
					$(this).removeClass('selected');
				} else {
					table.$('tr.selected').removeClass('selected');
					$(this).addClass('selected');
				}
			});
		});

		/*添加*/
		function u_label_add(title, url, w, h) {
			layer_show(title, url, w, h);
		}

		/*编辑*/
		function u_label_edit(obj,id,w,h){
			var edit_page = "<%=path%>/backstage/label-add-pre?id="+id;
			layer_show("编辑",edit_page,w,h);
		}

		/*删除*/
		function u_label_delete(obj,id){
			layer.confirm('确认删除？', {
				btn: ['确认','取消'], 
				shade: false
			},
			function(){
				$.ajax({
					type : "POST",
					url : "<%=path%>/backstage/u_label-delete",
					data : "id=" + id,
					error : function() {
						layer.msg('操作失败', {
							icon : 5,
							time : 1000
						});
					},
					success : function(msg) {
						layer.msg('已删除 ' + msg.information, {
							icon : 6,
							time : 1000
						});
						$(obj).parents("body").find(".btn-refresh").click();
					}
				});
			}, function() {
				layer.msg('未删除', {
					icon : 5,
					time : 1000
				});
			});
		}
	</script>
</body>
</html>



